import { get, postJSON } from '@/utils/request'
// 生成-订单(结算页)
export const memberOrderPre = () => {
  return get('/member/order/pre')
}

// 提交-订单
export const memberOrder = (order) => {
  return postJSON('/member/order', order)
}

// 获取-订单详情(以及支付结果)
export const getOrderDetail = (id) => {
  return get(`/member/order/${id}`)
}

// 支付-支付宝-PC
export const aliPay = (orderId, redirect) => {
  return get('/pay/aliPay', { orderId, redirect })
}

export const getUserOrder = (params) => {
  return get('/member/order', params)
}
